﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace classInterface.text
{
    public partial class UserControl1 : UserControl
    {
        public UserControl1(UserForm user)
        {
            InitializeComponent();
            _userForm = user;
        }

        public void ShowName()
        {

            label1.Text = _userForm.Name;
        }
        
        public void DrawString(Point[] p)
        {

            Graphics g = this.pictureBox1.CreateGraphics();
            g.Clear(Color.Red);
            g.FillRectangle(Brushes.Red, new Rectangle(new Point(20, 30), new Size(100,100)));

            g.DrawLines(new Pen(Color.Black,2),p);

            g.Dispose();

        }
             
        private UserForm _userForm { set; get; }

    }
}
